package com.seas.support;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.NoRepositoryBean;

import java.io.Serializable;
import java.util.List;

/**
 * Created by Seas Cheng on 2017/9/26
 */
@NoRepositoryBean  //指明当前接口不是我们领域类的接口
public interface CustomRespository<T, ID extends Serializable> extends JpaRepository<T, ID>, JpaSpecificationExecutor<T>{
    Page<T> findByAuto(T example, Pageable pageable);
    List<T> findBySortAuto(T example, Sort sort);
}
